/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */


function TimeScore(scene, spanActual, spanTop)
{
    this.scene = scene;
    this.actual = spanActual;
    this.top = spanTop;
    this.startTime = new Date().getTime();

    this.Draw = function()
    {
        this.actual.innerHTML = this.ToString();
    };
    this.getString = function(value)
    {
        
        var tmp = value //(new Date().getTime() - this.startTime);
        var ret =
                parseInt(tmp / 60000) + ":" +
                parseInt(tmp / 1000 % 60) + "." +
                parseInt(tmp % 1000 / 100);
        return ret;
    };
    this.ToString = function()
    {        
        var tmp = (new Date().getTime() - this.startTime);
        return this.getString(tmp);
    };
    this.getValue = function()
    {
        return (new Date().getTime() - this.startTime);
    }

}